<html>
<head>
<script src="../../resources/js-test.js"></script>
<style>
@font-face {
    font-family: Unused;
    src: url("data:font/ttf,unused-font");
}
</style>
<script>
description("Tests that unused font with a data: URL is not loaded. " +
            "No console warning for font load error is expected.");
window.jsTestIsAsync = true;

function getDocumentFontFaces() {
    var faces = [];
    document.fonts.forEach(function(face) { faces.push(face); });
    return faces;
}

function doTest() {
    faces = getDocumentFontFaces();
    shouldBeEqualToNumber('faces.length', 1);
    shouldBeEqualToString('faces[0].status', 'unloaded');
    finishJSTest();
}
</script>
</head>
<body onload="doTest()">
</body>
</html>
